package com.youlai.boot.system.model.dto;

import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.format.DateTimeFormat;
import cn.idev.excel.annotation.format.NumberFormat;
import cn.idev.excel.annotation.write.style.*;
import lombok.Data;
import cn.idev.excel.enums.BooleanEnum;
import cn.idev.excel.enums.poi.HorizontalAlignmentEnum;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 日报数据Excel数据传输对象
 *
 * @author xiheforever
 * @since 2025-06-03
 */
@Data
@ColumnWidth(18) // 设置默认列宽
@HeadStyle(fillForegroundColor = 22) // 设置表头背景色浅灰色
@HeadFontStyle(fontHeightInPoints = 11, bold = BooleanEnum.TRUE) // 设置表头字体
@ContentFontStyle(fontHeightInPoints = 10) // 设置内容字体
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER) // 设置字体居中
public class DailySalesReportExcelDTO {

    @ExcelProperty(value = "报告日期", order = 1)
    @DateTimeFormat("yyyy-MM-dd")
    @ColumnWidth(15)
    private LocalDate reportDate;

    @ExcelProperty(value = "客单价（元）", order = 2)
    @NumberFormat("¥#,##0.00")
    @ColumnWidth(20)
    private BigDecimal averageTransactionValue;

    @ExcelProperty(value = "转化率（%）", order = 3)
    @NumberFormat("0.00%")
    @ColumnWidth(15)
    private BigDecimal conversionRate;

    @ExcelProperty(value = "月度销售任务（万元）", order = 4)
    @NumberFormat("#,##0.00")
    @ColumnWidth(25)
    private BigDecimal monthlySalesTarget;

    @ExcelProperty(value = "已完成销售额（万元）", order = 5)
    @NumberFormat("#,##0.00")
    @ColumnWidth(25)
    private BigDecimal currentSalesAmount;

    @ExcelProperty(value = "销售进度（%）", order = 6)
    @NumberFormat("0.00%")
    @ColumnWidth(18)
    private BigDecimal salesProgress;

    @ExcelProperty(value = "时间进度（%）", order = 7)
    @NumberFormat("0.00%")
    @ColumnWidth(18)
    private BigDecimal timeProgress;

    @ExcelProperty(value = "GMV同比变化（%）", order = 8)
    @NumberFormat("+0.00%;-0.00%")
    @ColumnWidth(20)
    private BigDecimal gmvYoyChange;

    @ExcelProperty(value = "本月平均转化率（%）", order = 9)
    @NumberFormat("0.00%")
    @ColumnWidth(22)
    private BigDecimal avgConversionRate;

    @ExcelProperty(value = "本月平均客单价（元）", order = 10)
    @NumberFormat("¥#,##0.00")
    @ColumnWidth(25)
    private BigDecimal avgTransactionValue;

    @ExcelProperty(value = "本月总销售数量（件）", order = 11)
    @NumberFormat("#,##0")
    @ColumnWidth(25)
    private Integer totalSalesQuantity;
} 